package cn.wp.common.core.web.service;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * CallService 配置操作
 * Created by chenyb on 2019/10/14
 */
public class ServiceConfigurations {

    private static final Map<String,ServiceConfiguration> serviceConfigurationMaps = Maps.newHashMap();

    public ServiceConfigurations register(ServiceConfiguration serviceConfiguration){
        serviceConfigurationMaps.put(serviceConfiguration.getBeanName(),serviceConfiguration);
        return this;
    }

    ServiceConfiguration getServiceConfiguration(String beanName){
        return serviceConfigurationMaps.get(beanName);
    }

    boolean containsServiceConfiguration(String beanName){
        return serviceConfigurationMaps.containsKey(beanName);
    }

    public Map<String, ServiceConfiguration> getServiceConfigurationMaps() {
        return serviceConfigurationMaps;
    }
}
